<script runat="server">
    var nav_root = request.data("_nav_root");
    var linkurl = request.data("_linkurl");
    var nav_path = request.data("_nav_path");

    var breadcrumb = '<ol class="breadcrumb">';

    for (let i = 0; i < nav_path.length; i++) {
        var nav = nav_path[i];
        var href = "";
        if (nav.LinkUrl != "") {
            if (!(nav.LinkUrl.substring(0, 7) == "http://" ||
                nav.LinkUrl.substring(0, 8) == "https://")) {
                href = "/" + nav.LinkUrl + "/";
            } else {
                href = nav.LinkUrl;
            }
        } else {
            href = "/account/" + nav.ListUrl
        }

        var active = ("/" + linkurl.toLowerCase()) == href.toLowerCase();
        breadcrumb += '  <li ' + (active ? ' class="active"' : '') + '>';
        if (active) {
            breadcrumb += '       <a href="javascript:void(0);">' + nav.Name + '</a>';
        } else {
            breadcrumb += '       <a href="' + href + '"' + (nav.Blank ? ' target="_blank"' : '') + '>' + nav.Name + '</a>';
        }
        breadcrumb += '  </li>';
    }

    breadcrumb += '</ol>';
    response.write(breadcrumb);
    //$("#aaaa").append(breadcrumb);
</script>